﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace CodeCreator.CoreObj
{
    public partial class FrmMessage : Form
    {
        private string strOkText = "确定";

        public string StrOkText
        {
            get { return strOkText; }
            set { strOkText = value; }
        }
        private string strCancelText = "关闭";

        public string StrCancelText
        {
            get { return strCancelText; }
            set { strCancelText = value; }
        }
        private string strMessage;

        public string StrMessage
        {
            get { return strMessage; }
            set { strMessage = value; }
        }

        public FrmMessage()
        {
            InitializeComponent();
            this.btnOk.Text = strOkText;
            this.btnClose.Text = strCancelText;
            this.label1.Text = strMessage;
        }

        public FrmMessage(string strMessage)
        {
            InitializeComponent();
            this.btnOk.Text = strOkText;
            this.btnClose.Text = strCancelText;
            this.label1.Text = strMessage;
        }

        public FrmMessage(string strOkText, string strCancelText, string strMessage)
        {
            InitializeComponent();
            this.btnOk.Text = strOkText;
            this.btnClose.Text = strCancelText;
            this.label1.Text = strMessage;
        }

        private void btnOk_Click(object sender, EventArgs e)
        {

            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void btnClose_Click(object sender, EventArgs e)
        {

            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
        }
    }
}
